// JavaScript Document
/*first screen banner*/


/*five screen*/
	$(function(){
		var timer;
		var num=1;
		$('.wrapFiv .arrow span.right').click(function(){
				clearInterval(timer);
				$('.wrapFiv ul li').eq(num%3).addClass('current').siblings().removeClass();
				num=num+1; 
				timer=setInterval(run,50000);
				})
		$('.wrapFiv .arrow span.left').click(function(){
				clearInterval(timer);
				
				$('.wrapFiv ul li').eq((num+1)%3).addClass('current').siblings().removeClass();
				num=num-1; 
				timer=setInterval(run,50000);
				})
			
				timer=setInterval(run,50000);
				function run(){
					$('.wrapFiv ul li').eq(num%3).addClass('current').siblings().removeClass();
					num++;
					}				
	           })
/*animate*/

$(function(){
	$('#dowebok').fullpage({
		sectionsColor: ['#fff','#60393c', '#81a34d', '#273c5c', '#2f99b3'],
		anchors: ['page0','page1', 'page2', 'page3', 'page4'],
		menu: '#menu',
		afterLoad: function(anchorLink, index){
			if(index==2){
				$('.section1').find('.title').delay(100).animate({
					left:'54%'
					},2000,'easeOutQuart');
					$('.section1').find('.fly').delay(300).animate({
					top:'180px',left:'11%'
					},3000,'easeOutQuart');
					$('.section1').find('.dot').delay(300).animate({
					top:'180px',left:'60px'
					},3000,'easeOutQuart');
				}
			if(index == 3){
				
				/*$('.section2').find('p').delay(300).animate({
					left: '0'
				}, 1500, 'easeOutExpo');*/
				$('.section2').find('.title').delay(300).animate({
					left:'8%'
					},1500,'easeOutQuart');
				$('.section2').find('.dun').delay(300).animate({
					top:'178px'
					},1500,'easeOutQuart');
				$('.section2').find('.yun_front').delay(200).animate({
					left:'240px'
					},2500,'easeOutQuart');
				$('.section2').find('.yun_bg').delay(100).animate({
					right:'-212px'
					},2500,'easeOutQuart');
			}
			if(index == 4){
				$('.section3').find('.table').fadeIn(2000);
				$('.section3').find('.air').delay(300).animate({
					left:'190px',top:'230px'
				}, 2500, 'easeOutExpo');
				$('.section3').find('.title').delay(300).animate({
					left:'54%'
					},1500,'easeOutExpo');
				/*$('.section3').find('.star').delay(300).animate({
					left:'230px','top':'290px'
					},10000,'easeOutBack');	*/
			}
			if(index == 5){
				$('.section4').find('dt>a').fadeIn(2000);
				
					$('.section4').find('dt>a').delay(100).animate({
					'left':'38px','top':'0'
					},1000,'easeInOutQuint');
			}
		},
		onLeave: function(index, direction){
			if(index==2){
				$('.section1').find('.title').delay(100).animate({
					left:'-1200%'
					},1500,'easeOutQuart');
					$('.section1').find('.fly').delay(200).animate({
					top:'280px',left:'1%'
					},1500,'easeOutExpo');
					$('.section1').find('.dot').delay(100).animate({
					top:'190px',left:'30px'
					},1500,'easeOutExpo');
				}
			if(index == '3'){
				/*$('.section2').find('p').delay(300).animate({
					left: '-1200%'
				}, 1500, 'easeOutExpo');*/
				$('.section2').find('.title').delay(300).animate({
					left:'-1200%'
					},1500,'easeOutExpo');
				$('.section2').find('.dun').delay(300).animate({
					top:'170px'
					},1500,'easeOutQuart');
				$('.section2').find('.yun_front').delay(300).animate({
					left:'220px'
					},1500,'easeOutQuart');
				$('.section2').find('.yun_bg').delay(300).animate({
					right:'-212px'
					},1500,'easeOutQuart');
			}
			if(index == '4'){
				$('.section3').find('.table').fadeOut(1000);				
				$('.section3').find('.air').delay(300).animate({
					left:'205px',top:'270px'
				}, 1500, 'easeOutExpo');
				$('.section3').find('.title').delay(300).animate({
					left:'-1200%'
					},1500,'easeOutExpo');
				/*$('.section3').find('.star').delay(300).animate({
					left:'200px','top':'260px'
					},15000,'easeOutCirc');*/
			}
			if(index == '5'){
				
				$('.section4').find('dt>a').fadeOut(1000);
				$('.section4').find('dt>a').delay(300).animate({
					'left':'58px','top':'37px'
					},1000,'easeInOutBack');
				
			}
		}
	});
});
/*nav*/
$(function(){
	$('.header .hCenter ul li').click(function(){
		$(this).addClass('current').siblings().removeClass('current');
		})
	})
$(function(){
	$('.footer .fCenter span').mouseover(function(){
		$(this).css('opacity','1');
		}).mouseout(function(){
			$(this).css('opacity','0.5');
			})
	})